import { exInputNumber, exInput, exSelect } from '@ve/common/components/extension'

export default {
  VERSION: '20220408',
  type: 'uiCount',
  name: '计数器',
  icon: 'checkbox-blank-line',
  svg: 'jishuqi',
  //数据别名
  // dataName: 'uiFlexbox_data',
  //扩展
  extension: {
    boxHeight: exInputNumber('高度', 50, 1, 500),
    topMargin: {
      type: 'exInputNumber',
      name: '上外边距',
      value: 0,
    },
    rightMargin: {
      type: 'exInputNumber',
      name: '右外边距',
      value: 0,
    },
    bottomMargin: {
      type: 'exInputNumber',
      name: '下外边距',
      value: 0,
    },
    leftMargin: {
      type: 'exInputNumber',
      name: '左外边距',
      value: 0,
    },
    backgroundColor: {
      type: 'exSetChartColor',
      name: '背景颜色',
      value: '#fff',
    },
    startVal: exInput('开始值', 1),
    endVal: exInput('结束值', 10000),
    duration: exInputNumber('动画时间', 1, 0, 10),
    decimals: exInputNumber('小数位数', 0, 0, 10),
    separator: exInput('分隔符', ','),
    prefix: exInput('前缀', ''),
    suffix: exInput('后缀', ''),
    letterSpacing: exInputNumber('间距', 0, 0, 500),
    titleFontSize: {
      type: 'exInputNumber',
      name: '字体大小',
      value: 12,
    },
    titleColor: {
      type: 'exSetChartColor',
      name: '字体颜色',
      value: '#000',
    },
    titleFontWeight: exSelect('字体粗细', 500, [
      {
        label: '正常',
        value: 500,
      },
      {
        label: '加粗',
        value: 600,
      },
      {
        label: '特粗',
        value: 700,
      },
    ]),
    justifyAlign: {
      type: 'exRadioGroup',
      name: '水平位置',
      value: 'center',
      list: [
        {
          label: '居左',
          value: 'start',
        },
        {
          label: '居中',
          value: 'center',
        },
        {
          label: '居右',
          value: 'end',
        },
      ],
    },
    itemsAlign: {
      type: 'exRadioGroup',
      name: '垂直方向',
      value: 'center',
      list: [
        {
          label: '居上',
          value: 'start',
        },
        {
          label: '居中',
          value: 'center',
        },
        {
          label: '居下',
          value: 'end',
        },
      ],
    },
  },
  list: [],
}
